function checkPw(event) {
    var password1 = document.getElementById('upwd').value;
    var password2 = document.getElementById('upwd2').value;

    if (password1 !== password2) {
    alert("两次输入的密码不一致，请重新输入");
    event.preventDefault(); // 阻止表单的默认提交行为
    return false;
}
    return true; // 允许表单提交
}